<?php
namespace app\admin\controller;

use think\Controller;
use think\Request;

class Index extends Controller
{
    protected $middleware = ['Check'];
    /**
     * 显示后台首页
     *
     * @return \think\Response
     */
    public function index(Request $request)
    {
        //设置用户信息session
        $userinfo = $request->userinfo;
        session('realname',$userinfo['uname']);
        session('id',$userinfo['id']);
        return $this->fetch();
    }
}
